Skip to content

ci: classify pull request risk with Jev - #1323

Merged
betegon merged 1 commit into
mainfrom
bt/jev-pr-risk
Sep 22, 2026
Merged

betegon merged 1 commit into
mainfrom
bt/jev-pr-risk

Conversation

@betegon

@betegon betegon commented Sep 22, 2026

Copy link
Copy Markdown
Member

Add automatic Jev risk classification when a non-draft PR opens, receives a push, is reopened, becomes ready for review, or changes its title or description. Manual dispatch accepts a PR number for backfills, including drafts.

The pinned Action reads PR metadata and Git diffs without checking out or executing PR code. Its result updates only the risk: low, risk: medium, or risk: high label after revision checks. A failed current-revision classification clears the previous verdict; results remain available as workflow artifacts for 30 days.

Includes regression coverage for label replacement, stale revisions, failed classifications, concurrent label creation, and idempotent publication, plus operations documentation for the existing AI_GATEWAY_API_KEY secret.

Co-Authored-By: GPT-6 <noreply@openai.com>
@betegon
betegon marked this pull request as ready for review September 22, 2026 14:33
@betegon
betegon merged commit a769007 into main Sep 22, 2026
16 checks passed
@betegon
betegon deleted the bt/jev-pr-risk branch September 22, 2026 14:38

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1ee45b9. Configure here.

Comment thread .github/workflows/pr-risk-jev.yml Resolved
Comment on lines +13 to +15
const script = workflow.match(/^ {10}script: \|\n((?: {12}.*\n|\n)+)/m)?.[1];
assert.ok(script, "Publish risk label script must exist");
const AsyncFunction = Object.getPrototypeOf(async () => {}).constructor;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk label creation fails when the shared label is absent

The workflow grants only pull-requests: write, but issues.createLabel requires the Issues write permission. On a repository where a target risk label has not been pre-created, the 404 fallback attempts to create it and receives 403, so the classification fails before the PR receives its risk label.

Evidence
  • .github/workflows/pr-risk-jev.yml explicitly grants only contents: read and pull-requests: write, so the Issues permission is unset.
  • The publish path calls issues.getLabel and, when the shared label is missing, calls issues.createLabel before issues.addLabels.
  • Creating a repository label requires issues: write; therefore a missing risk: low, risk: medium, or risk: high label causes the create call to fail with 403 and prevents publication.
  • The regression test mocks label creation and does not model GitHub token permissions, so it cannot expose this workflow failure.
Also found at 1 additional location
  • .github/workflows/pr-risk-jev.yml:13-15

Identified by Warden · code-review · YJ8-XDK

mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…ntry#1324)

On the CLI landing page, the fixed install overscroll banner covers the
footer GitHub icon. The repo is already linked in the header, so this
drops the redundant footer social icons.

**Footer override**

Adds a local Starlight `Footer` that keeps pagination/spacing from
`@sentry/starlight-theme` but omits the social/GitHub nav.

Fixes getsentry#1323

<!-- junior-request-attribution:start -->
Requested by **Daniel Szoke**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC010884QHLG%3A1785506880.261139 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC010884QHLG%3A1785506880.261139)
[Sentry](https://sentry.sentry.io/explore/conversations/slack%3AC010884QHLG%3A1785506880.261139/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Daniel Szoke <daniel.szoke@sentry.io>
Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant